package com.ljy.my_study.观察者;

import java.util.Observable;
import java.util.Observer;

/** 
* @author James
* @date 2018年8月28日 
*/
public class Subscribe implements Observer{

	private Observable observable;
	
	public Observable getObservable() {
		return observable;
	}

	public void setObservable(Observable observable) {
		this.observable = observable;
	}

	public Subscribe(Observable observable) {
		observable.addObserver(this);
	}

	@Override
	public void update(Observable o, Object arg) {
		System.out.println("更新内容："+arg);
	}

}
